<?php
namespace app\index\controller;
use think\Controller;
use think\Db;
use think\Loader;
use think\Cache;
class Fang extends Controller
{
    
    function index(){
        
        // $ip     = getIP();
       
        if(!wx_mobile()){
            $this->redirect("https://xw.qq.com/");
        }
       
        $ubodingdan = trim(htmlspecialchars(input("get.ddh"),ENT_QUOTES)); //提交订单号 . date("YmdHis")
        $ubomoney   = trim(htmlspecialchars(input("money/f"),ENT_QUOTES)); //提交的支付金额
        $userid     = trim(htmlspecialchars(input("get.userid"),ENT_QUOTES)); //提交的用户ID
        $ddh3       = trim(htmlspecialchars(input("get.ddh"),ENT_QUOTES));
        $zyid       = trim(htmlspecialchars(input("zyid/d"),ENT_QUOTES));
        $code       = trim(htmlspecialchars(input("get.code"),ENT_QUOTES));
        $uopenid    = trim(htmlspecialchars(input("get.uopenid",''),ENT_QUOTES));
        $pid        = trim(htmlspecialchars(input("get.pid",''),ENT_QUOTES));
        $is_baotian = trim(htmlspecialchars(input("get.is_baotian"),ENT_QUOTES));
        $b_money    = trim(htmlspecialchars(input("b_money/f"),ENT_QUOTES));
        $ename = Cache::store('redis')->get('ylluodi');
        //$ename = Db::name('ename')->where(['status' => 1, 'zt' => 1,'type' => 3])->value('ename');
        $this->assign("ubodingdan", $ubodingdan);
        $this->assign("ubomoney", $ubomoney);
        $this->assign("userid", $userid);
        $this->assign("is_baotian", $is_baotian);
        $this->assign("b_money", $b_money);
        $this->assign("ddh3", $ddh3);
        $this->assign("zyid", $zyid);
        $this->assign("code", $code);
        $this->assign("uopenid", $uopenid);
        $this->assign('turl',"http://".$ename ."/index/pay/saomahuang.html");
        return $this->fetch();
        
        
        
    }
    
    
     function dalaohu(){
        
        // $ip     = getIP();
       
        if(!wx_mobile()){
            $this->redirect("https://xw.qq.com/");
        }
       
        $ubodingdan = trim(htmlspecialchars(input("get.ddh"),ENT_QUOTES)); //提交订单号 . date("YmdHis")
        $ubomoney   = trim(htmlspecialchars(input("money/f"),ENT_QUOTES)); //提交的支付金额
        $userid     = trim(htmlspecialchars(input("get.userid"),ENT_QUOTES)); //提交的用户ID
        $ddh3       = trim(htmlspecialchars(input("get.ddh"),ENT_QUOTES));
        $zyid       = trim(htmlspecialchars(input("zyid/d"),ENT_QUOTES));
        $code       = trim(htmlspecialchars(input("get.code"),ENT_QUOTES));
        $uopenid    = trim(htmlspecialchars(input("get.uopenid",''),ENT_QUOTES));
        $pid        = trim(htmlspecialchars(input("get.pid",''),ENT_QUOTES));
        $is_baotian = trim(htmlspecialchars(input("get.is_baotian"),ENT_QUOTES));
        $b_money    = trim(htmlspecialchars(input("b_money/f"),ENT_QUOTES));
        $ename = Cache::store('redis')->get('ylluodi');
        //$ename = Db::name('ename')->where(['status' => 1, 'zt' => 1,'type' => 3])->value('ename');
        $this->assign("ubodingdan", $ubodingdan);
        $this->assign("ubomoney", $ubomoney);
        $this->assign("userid", $userid);
        $this->assign("is_baotian", $is_baotian);
        $this->assign("b_money", $b_money);
        $this->assign("ddh3", $ddh3);
        $this->assign("zyid", $zyid);
        $this->assign("code", $code);
        $this->assign("uopenid", $uopenid);
        $this->assign('turl',"http://".$ename ."/index/pay/saoma.html");
        return $this->fetch();
        
        
        
    }
    
}